package raft.node;

public interface NodeStatus {
    int FOLLOWER = 0;
    int CANDIDATE = 1;
    int LEADER = 2;

    enum Enum{
        FOLLOWER(0);
        int CODE;
        Enum(int i) {
            CODE = i;
        }

        public static Enum value(int i){
            for(Enum value: values()){
                if(value.CODE == i ){
                    return value;
                }
            }
            return null;
        }

    }

}
